package com.teacher.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.teacher.common.CommonResult;
import com.teacher.pojo.dto.login.LoginDto;
import com.teacher.pojo.dto.student.StudentAddDto;
import com.teacher.pojo.dto.student.StudentGetDto;
import com.teacher.pojo.entity.PerStudent;
import com.teacher.pojo.vo.student.StudentGetVo;

import java.util.List;
import java.util.concurrent.ConcurrentMap;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zfm
 * @since 2021-06-15
 */
public interface IPerStudentService extends IService<PerStudent> {
    /**
     * 添加学生
     *
     * @param dto
     * @return
     */
    CommonResult<String> add(StudentAddDto dto);

    /**
     * 查询学生信息
     *
     * @param dto
     * @return
     */
    CommonResult<IPage<StudentGetVo>> getPage(StudentGetDto dto);

    /**
     * 查询学号是否存在
     *
     * @param studentKey
     * @return
     */
    boolean isExit(String studentKey);

    /**
     * 登录
     *
     * @param dto
     * @return
     */
    CommonResult<ConcurrentMap<String, Object>> login(LoginDto dto);

    /**
     * 远程搜索学生-带权限
     *
     * @param name
     * @return
     */
    CommonResult<List<PerStudent>> getByName(String name);
}
